import { createRouter, createWebHistory } from 'vue-router'
import Home from '../views/Home.vue'
import Welcome from '../views/Welcome.vue'
import Resume from '../views/Resume.vue'
import Wrok from '../views/components/work/index'
import Project from '../views/components/project/index'
import Skill from '../views/components/skill/index'
import Show from '../views/components/show/index'
import Education from '../views/components/education/index'
const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    redirect: '/welcome',
    children:[
      {
        path: '/welcome',
        name: 'Welcome',
        component: Welcome,
      },
      {
        path: '/resume',
        name: 'Resume',
        component: Resume,
        redirect: '/work',
        children:[
          {
            path: '/work',
            name: 'Work',
            component: Wrok,
          },
          {
            path: '/project',
            name: 'Project',
            component: Project,
          },
          {
            path: '/show',
            name: 'Show',
            component: Show,
          },
          {
            path: '/skill',
            name: 'Skill',
            component: Skill,
          },
          {
            path: '/education',
            name: 'Education',
            component: Education,
          },
        ]
      },

    ]
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
